package com.treasure.domain.domain;

import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.treasure.common.model.command.ConversationRequest;
import com.treasure.common.types.Prompt;
import com.treasure.common.model.ChatHistoryEntity;

import java.util.List;

/**
 * @author sunhongmin
 * @date 2023/8/27 09:06
 * @description 大语言模型领域服务
 */
public interface LargeLanguageModelDomainService {

    /**
     * 生成答案
     *
     * @param prompt 提示词模版
     * @return 答案
     */
    String callGeneration(Prompt prompt);

    /**
     * 生成答案
     *
     * @param conversationRequest
     * @return
     */
    String callGeneration(ConversationRequest conversationRequest) throws NoApiKeyException, InputRequiredException;

}
